VPL: use WAYPT_SET.
authorrobertl <robertl>
Sat, 18 Jul 2009 20:07:06 +0000 (20:07 +0000)
committerrobertl <robertl>
Sat, 18 Jul 2009 20:07:06 +0000 (20:07 +0000)
vpl.c

diff --git a/vpl.c b/vpl.c
index 12e7372ac80a0a21f9951ab954979d3b55523891..a2cbf0ed19f7f4fdb15ac03cb14a07f8b6ba6d86 100644 (file)
--- a/vpl.c
+++ b/vpl.c
@@ -154,8 +154,8 @@ vpl_parse_75_sentence(const char *ibuf)
        waypt->longitude = lon_raw / (double) 0xE1000;
        waypt->altitude  = alt;
        waypt->sat       = sats;
-       // Speed comes in MPH*16 which we have to convert to m/s
-       waypt->speed     = (speed_raw / (double) 0x10) * 0.44704;
+       // Speed comes in (MPH x 0x10) which we have to convert to m/s
+       WAYPT_SET(waypt, speed, (speed_raw / (double) 0x10) * 0.44704);
        waypt->course    = hdg_raw * (double) (360/65535);
 
        waypt->creation_time = mkgmtime(&tm);